/*
 * @Description: 登录
 * @Author: seadon
 * @LastEditors: zhaoxiaoyang zhaoxiaoyang@byteluck.com
 * @Date: 2021-07-12 15:10:50
 * @LastEditTime: 2024-05-08 16:25:03
 */
interface LangMap {
	[propName: string]: any
}
enum LocaleEnum {
	zh = 'zh-CN',
	en = 'en-US',
	ja = 'ja-JP',
}
const languageType = ['zh-CN', 'en-US', 'ja-JP']
const localeData =
	localStorage.getItem('locale') &&
	languageType.includes(localStorage.getItem('locale') as any)
		? localStorage.getItem('locale')!
		: LocaleEnum.zh
const locale: string = localeData.substr(0, 2)

const langData: LangMap = {
	en: {
		InternalLogin: 'Internal Login',
		ExternalLogin: 'External Login',
		signIn: 'Log in',
		register: 'Register',
		account: 'Account number',
		insideAccountNumber: 'Please enter account',
		outsideAccountNumber: 'Please enter mobile phone number or email',
		password: 'Password',
		inputPassword: 'Please enter the password',
		rememberNumber: 'Remember the account number',
		otherLogin: 'Other ways to log in',
		unifiedAuthentication: 'Unified Authentication',
		passwordCannotEmpty: 'Username and password cannot be empty',
		weCom: 'Enterprise WeChat',
		feishu: 'Flying book',
		dingTalk: 'Ding Talk',
		zyddingTalk: 'Ding ZJ',
		switchLanguage: 'Switch language',
		cancelBtn: 'Cancel',
		captcha: 'Captcha',
		inputCaptcha: 'Please enter the Captcha',
	},
	ja: {
		InternalLogin: '内部ログイン',
		ExternalLogin: '外部ログイン',
		signIn: 'ログイン',
		register: '登録',
		account: 'ユーザID',
		insideAccountNumber: 'アカウント、メールアドレス',
		outsideAccountNumber: '携帯電話番号またはメールアドレスを入力してください',
		password: 'パスワード',
		inputPassword: 'パスワードを入力してください',
		rememberNumber: 'IDとパスワードを保存する',
		otherLogin: 'ログインする他の方法',
		unifiedAuthentication: '統一認証',
		passwordCannotEmpty: 'ユーザー名とパスワードを空にすることはできません',
		weCom: 'エンタープライズWeChat',
		feishu: 'Feishu',
		dingTalk: 'ディントーク',
		zyddingTalk: 'Ding ZJ',
		switchLanguage: '言語を切り替える',
		cancelBtn: 'キャンセル',
		captcha: '検証パスワード',
		inputCaptcha: '認証コードを入力してください',
	},
	zh: {
		InternalLogin: '内部组织登录',
		ExternalLogin: '外部组织登录',
		signIn: '登录',
		register: '注册',
		account: '账号',
		insideAccountNumber: '请输入账号',
		outsideAccountNumber: '请输入手机号或者邮箱',
		password: '密码',
		inputPassword: '请输入密码',
		rememberNumber: '记住账号',
		otherLogin: '其他登录方式',
		unifiedAuthentication: '统一认证',
		passwordCannotEmpty: '账号或密码不能为空',
		weCom: '企业微信',
		feishu: '飞书',
		dingTalk: '钉钉',
		zyddingTalk: '浙政钉',
		cancelBtn: '取消',
		switchLanguage: '切换语言',
		captcha: '验证码',
		inputCaptcha: '请输入验证码',
	},
}
export const t = langData[locale]
export const imAll = [
	{
		name: t.feishu,
		imgName: 'lark.png',
		type: '1',
	},
	{
		name: t.weCom,
		imgName: 'wx.png',
		type: '2',
	},
	{
		name: t.dingTalk,
		imgName: 'dingtalk.png',
		type: '4',
	},
	{
		name: t.zyddingTalk,
		imgName: 'zydd.png',
		type: '8',
	},
]
